
#ifndef _ISTATICS_H_
#define _ISTATICS_H_

#include <time.h>
#include <BClock>
#include <BEvent>
#include <BApplication>
#include <BSocket>
#include <BStyle>
#include <BCursor>
#include <BDrag>
#include <BDragEvent>
#include <BScene>

#include "IWindow.h"
#include "IStyleDriver.h"

using namespace BWE;

extern bool				app_done;
extern int				app_code;
extern int 				app_realFrequency;
extern int				app_frequency;
extern clock_t			app_timeCounter;
extern double			app_lastRenderTime;
extern BClock			app_frequencyTimer;

extern BString					app_libPath;
extern BArray<BString>			app_pluginPaths;
extern BArray<BString>			app_fontPaths;
extern BArray<BString>			app_dataPaths;

extern BString					app_styleSheet;
extern BHolder<IStyleDriver>	app_styleDriver;
extern BHolder<BStyle>			app_style;
extern BList<IWindowHolder>		app_windows;
extern BList<BSocketHolder>		app_sockets;
extern BList<BScene*>			app_scenes;

bool App_AttachWindow(BWidget* widget);
bool App_DetachWindow(IWindow* window);

void App_CycleBegin();
void App_Event(IWindow* window = 0);
void App_Event(BDrag* drag);
void App_Update();
void App_Frame();
void App_CycleEnd();

#endif